#{extends 'simpleTemplate.html' /}
<title>&{'Users_change_email_header'}</title>
<script>
    function saveNewEmail(newEmail) {
        $.get("/changeEmail", {"oldEmail": "${oldEmail}", "newEmail": newEmail}, function () {
            document.location.href = "/userList";
        })
    }
</script>
<div class="content">
    <div class="content-header">
        <h3>&{'Users_change_email'}</h3>
    </div>


    <div class="content-body">
        <p>&{'Users_change_email_old_email'} ${oldEmail}</p>
        <input type="text" id="new-email"/>
        <br>
        <input type="button" value="&{'Users_change_save'}" onclick="saveNewEmail($('#new-email').val())"/>
        </br>
    </div>

</div>